<!-- IF S_PM_LIST -->
<table cellpadding="0" cellspacing="5" width="100%" border="0" align="center">
 <tr align="center">
  <td width="50%"></td>
  <th>{L_SUBJECT}</th>
  <td>&nbsp;</td>
  <th>{L_AUTHOR}</th>
  <td width="50%"></td>
 </tr>
<!-- BEGIN pm_list_row -->
 <tr align="center">
  <td width="50%"></td>
  <td>
   <nobr><a href="{pm_list_row.PM_LINK}">{pm_list_row.SUBJECT}</a>&nbsp;<span class="popup_control" onmouseover="timer=setTimeout('ajax_pm_preview({pm_list_row.PM_ID})',1000)" onmousemove="getMousePosition(event,'pm_preview');" onmouseout="clearTimeout(timer);document.getElementById('pm_preview').style.display='none'">[?]</span></nobr>
  </td>
  <td></td>
  <td>
   <a href="{pm_list_row.PROFILE}"><nobr>{pm_list_row.AUTHOR}</nobr></a>
  </td>
  <td width="50%"></td>
 </tr>
<!-- END pm_list_row -->
</table>
<!-- ELSE -->
<script type="text/javascript">
// <![CDATA[
var msie = navigator.userAgent.toLowerCase().indexOf("msie") != -1
	&& document.all
	&& ((document.compatMode && document.compatMode != "BackCompat")
		? document.documentElement : document.body? document.body : null)
	&& !(!!(window.opera && document.getElementById));
function ajax_pm()
{
	// Create new JsHttpRequest object.
	var req = new JsHttpRequest("utf-8");
	// Code automatically called on load finishing.
	req.onreadystatechange = function()
	{
		if (req.readyState == 4)
		{
			if(req.responseJS && req.responseJS.pm_popup == true)
			{
				if (document.getElementById('pm_popup').style.display == "block" )
				{
					document.getElementById('pm_popup_text').innerHTML += "<br />" + req.responseJS.pm_new;
				}
				else
				{
				document.getElementById('pm_popup').style.display = "block"
				document.getElementById('pm_popup_text').innerHTML = req.responseJS.pm_new;
				}
			}
			setTimeout('ajax_pm()', {CHECK_TIMEOUT});
		}
	}
	// Prepare request object (automatically choose GET or POST).
	req.open(null, 'aljax.php', true);
	// Send data to backend.
	req.send( {mode:'pm_check'} );
}
function ajax_pm_list()
{
	document.getElementById('new_pm_list').style.display = "block";
	document.getElementById('new_pm_list_inner').innerHTML = "{L_LOADING}";
	
	// Create new JsHttpRequest object.
	var req = new JsHttpRequest("utf-8");
	// Code automatically called on load finishing.
	req.onreadystatechange = function()
	{
		if (req.readyState == 4)
		{
			if(req.responseText)
			{
				document.getElementById('new_pm_list_inner').innerHTML = req.responseText;
			}
			else
			{
			}
		}
	}
	// Prepare request object (automatically choose GET or POST).
	req.open(null, 'aljax.php', true);
	// Send data to backend.
	req.send( {mode:'pm_list'} );
}
function ajax_pm_preview(pm_id)
{
	document.getElementById('pm_preview').innerHTML = "{L_LOADING}";
	document.getElementById('pm_preview').style.display = "block";
	// Create new JsHttpRequest object.
	var req = new JsHttpRequest("utf-8");
	// Turn on caching
	req.caching = true;
	// Code automatically called on load finishing.
	req.onreadystatechange = function()
	{
		if (req.readyState == 4)
		{
			if(req.responseText)
			{
				document.getElementById('pm_preview').innerHTML = req.responseText;
			}
			else
			{
			}
		}
	}
	// Prepare request object (automatically choose GET or POST).
	req.open(null, 'aljax.php', true);
	// Send data to backend.
	req.send( {mode:'pm_preview', id:pm_id} );
}

// ]]>
</script>

<div class="pm_popup" id="pm_popup" style="display:none">
	<div class="inner" style="text-align:right;">
		<span class="popup_control" onclick="document.getElementById('pm_popup').style.display = 'none'">
			X
		</span>
	</div>
	<span id="pm_popup_text"></span>
	<br />
	<br />
	<div class="inner" style="text-align:right;">
		<span class="popup_control" onclick="ajax_pm_list()">{L_SHOW_PM_LIST}</span><br />
	</div>
	<div class="msg_content" id="new_pm_list" style="display:none">
	<div id="new_pm_list_inner" style="width:100%">
	</div>
	</div>
</div>
<div class="pm_preview" style="display:none;top:0;left:0;" id="pm_preview">
</div>
<script type="text/javascript">
ajax_pm();
</script>
<!-- ENDIF -->